package com.why.controller;


import com.why.aop.LogAnn;
import com.why.entity.Dic;
import com.why.entity.Result;
import com.why.service.IDicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hy-woo
 * @since 2022-06-07
 */
@RestController
@RequestMapping("/dic")
public class DicController {

    @Autowired
    IDicService dicService;

    @LogAnn
    @RequestMapping("/dicList")
    public Result dicList(int type){
        List<Dic> list=dicService.dicListByType(type);
        return new Result(200,"ok",list);
    }

}
